using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using jtgApp.Model;
using System.Data;
using Android.Graphics;
using Java.Net;
using jtgApp.banner;

namespace jtgApp.ItemLoader
{
    public class TGitemLoader
    {
        public List<Product> MySimpleItems { get; private set; }
        public bool IsBusy { get; set; }
        public bool CanLoadMoreItems { get; set; }

        public DataTable data { get; set; }

        public TGitemLoader()
        {
            MySimpleItems = new List<Product>();
        }
        public void LoadMoreItems(DataTable dt)
        {
            IsBusy = true;
            foreach (DataRow dr in dt.Rows)
            {
                MySimpleItems.Add(new Product()
                {
                    productID= dr[0].ToString(),
                    productName = dr[1].ToString(),
                    
                    tgImage = Tools.getImage(dr[2].ToString()),
                    tgPrice = dr[3].ToString(),
                    OldPrice = dr[3].ToString()
                });
            }

            CanLoadMoreItems = true;
            IsBusy = false;
        }
        
    }
}